<?php
/*
*	2012年7月6日16:25:17
*	google图片数据采集器
*	袁吉
*/
class GetGoogleImageModel extends Model{
	var $query_option = array(
			"q" => '美女',
			"num" => 10,
			"hl" => 'zh-CN',
			"newwindow" => '1',
			"safe" => 'strict',
			"site" => 'imghp',
			"biw" => 1440,//窗口宽度
			"bih" => 900,//窗口高度
			"tbm" => 'isch',
			"ijn" => 0,
			"ei" => '3iztT8a9GOO4iQeHhfmxDQ',
			"page" => 1,
			"start" => 1,
			"tbs"=>"isz:ex,iszw:640,iszh:960",//大小筛选 任意尺寸:imgo:1,指定大小：isz:ex,iszw:640,iszh:960
		);
	var $google_url = "http://www.google.com.hk/search";
    public function _initialize($option=NULL){	
		foreach($this->query_option as $key=>&$q){
			if(isset($_REQUEST[$key])){
				$q = $_REQUEST[$key];
			}
		}
		if(!empty($option)){
			$this->query_option = array_merge($this->query_option,$option);
		}
    }
	/*
	*	获取google的图片数据,返回一个数组
	*/
	public function getImageData(){
		$query = http_build_query($query_option);
		
	}
	
}